﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FWPDocumentation
{
    public partial class EntryDialog : Form
    {
        public EntryDialog()
        {
            InitializeComponent();
        }

        public string ResultText { get; set; }

        public static string GetString(string title)
        {
            var box = new EntryDialog { Text = title };

            if (box.ShowDialog() == DialogResult.OK)
            {
                return box.ResultText;
            }

            return string.Empty;
        }



        private void btOKEntryDialog_Click(object sender, EventArgs e)
        {
            this.ResultText = tbEntryDialog.Text;
            this.DialogResult = DialogResult.OK;
        }

        private void btCancelEntryDialog_Click(object sender, EventArgs e)
        {
            this.Close();

        }
    }
}
